﻿namespace KinonekoSoftware.CodariaDB.Runtimes
{
    partial class RepositoryRuntime
    {
        private long ElapsedTime_LoadDatabase;
        private long ElapsedTime_OpenEngine;
        private long ElapsedTime_Close;
        private long ElapsedTime_Load;

        public void Diagnostic()
        {
            //
            //
            _logger.Info($"关闭数据库，耗时{ElapsedTime_Close}ms");
            
            //
            //
            _logger.Info($"加载数据库，耗时{ElapsedTime_LoadDatabase}ms");
            
            //
            //
            foreach (var engine in _Engines)
            {
                _logger.Debug($"加载引擎{engine.EngineID}，耗时{engine.EngineOpenElapsedTime}ms");
            }
            
            //
            //
            _logger.Info($"加载所有引擎，总耗时{ElapsedTime_OpenEngine}ms");
            _logger.Info($"加载世界观，总耗时{ElapsedTime_Load}ms");
        }
    }
}